package com.csproj.dispatch.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 货物详细信息表-商品信息表
 */
@ApiModel(description = "货物详细信息表-商品信息表")
@Entity
@Table(name = "t_dis_product_detail_info")
public class ProductDetailInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    /**
     * 货物基本信息主键
     */
    @ApiModelProperty(value = "货物基本信息主键")
    @Column(name = "info_id")
    private String infoId;

    /**
     * hs编码
     */
    @ApiModelProperty(value = "hs编码")
    @Column(name = "hs_code")
    private String hsCode;

    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @Column(name = "product_name")
    private String productName;

    /**
     * 规格
     */
    @ApiModelProperty(value = "规格")
    @Column(name = "spc")
    private String spc;

    /**
     * 数量
     */
    @ApiModelProperty(value = "数量")
    @Column(name = "quantity")
    private Double quantity;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    @Column(name = "unidate")
    private String unidade;

    /**
     * 原产国
     */
    @ApiModelProperty(value = "原产国")
    @Column(name = "origin")
    private String origin;

    /**
     * 最终目的国（地区）
     */
    @ApiModelProperty(value = "最终目的国（地区）")
    @Column(name = "destination")
    private String destination;

    /**
     * 单价
     */
    @ApiModelProperty(value = "单价")
    @Column(name = "price")
    private Double price;

    /**
     * 总价
     */
    @ApiModelProperty(value = "总价")
    @Column(name = "total")
    private Double total;

    /**
     * 币制
     */
    @ApiModelProperty(value = "币制")
    @Column(name = "moeda")
    private String moeda;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getInfoId() {
        return infoId;
    }

    public ProductDetailInfo infoId(String infoId) {
        this.infoId = infoId;
        return this;
    }

    public void setInfoId(String infoId) {
        this.infoId = infoId;
    }

    public String getHsCode() {
        return hsCode;
    }

    public ProductDetailInfo hsCode(String hsCode) {
        this.hsCode = hsCode;
        return this;
    }

    public void setHsCode(String hsCode) {
        this.hsCode = hsCode;
    }

    public String getProductName() {
        return productName;
    }

    public ProductDetailInfo productName(String productName) {
        this.productName = productName;
        return this;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getSpc() {
        return spc;
    }

    public ProductDetailInfo spc(String spc) {
        this.spc = spc;
        return this;
    }

    public void setSpc(String spc) {
        this.spc = spc;
    }

    public Double getQuantity() {
        return quantity;
    }

    public ProductDetailInfo quantity(Double quantity) {
        this.quantity = quantity;
        return this;
    }

    public void setQuantity(Double quantity) {
        this.quantity = quantity;
    }

    public String getUnidade() {
        return unidade;
    }

    public ProductDetailInfo unidade(String unidade) {
        this.unidade = unidade;
        return this;
    }

    public void setUnidade(String unidade) {
        this.unidade = unidade;
    }

    public String getOrigin() {
        return origin;
    }

    public ProductDetailInfo origin(String origin) {
        this.origin = origin;
        return this;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getDestination() {
        return destination;
    }

    public ProductDetailInfo destination(String destination) {
        this.destination = destination;
        return this;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public Double getPrice() {
        return price;
    }

    public ProductDetailInfo price(Double price) {
        this.price = price;
        return this;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getTotal() {
        return total;
    }

    public ProductDetailInfo total(Double total) {
        this.total = total;
        return this;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public String getMoeda() {
        return moeda;
    }

    public ProductDetailInfo moeda(String moeda) {
        this.moeda = moeda;
        return this;
    }

    public void setMoeda(String moeda) {
        this.moeda = moeda;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public ProductDetailInfo deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public ProductDetailInfo deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public ProductDetailInfo deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public ProductDetailInfo lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public ProductDetailInfo lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public ProductDetailInfo creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public ProductDetailInfo creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ProductDetailInfo productDetailInfo = (ProductDetailInfo) o;
        if (productDetailInfo.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), productDetailInfo.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "ProductDetailInfo{" +
            "id=" + getId() +
            ", infoId='" + getInfoId() + "'" +
            ", hsCode='" + getHsCode() + "'" +
            ", productName='" + getProductName() + "'" +
            ", spc='" + getSpc() + "'" +
            ", quantity=" + getQuantity() +
            ", origin='" + getOrigin() + "'" +
            ", destination='" + getDestination() + "'" +
            ", price=" + getPrice() +
            ", total=" + getTotal() +
            ", moeda='" + getMoeda() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
